import instance from './request.js'

// 根据商品id查询详情信息
export const getGoodsDetailById = params => instance.get('/goods/detail', { params } )

// 根据商品id查询该商品的相关类似产品列表
export const getGoodsRelatedById = params => instance.get('/goods/related', { params } )

// 获取购物车对应数据
export const getCartData = () => instance.get('/cart/index')

// 加入购物车
export const toAddCart = data => instance.post('/cart/add', data)